<!DOCTYPE html>
<html lang="zh">
    <head>
        <meta charset="utf-8"/>
        <meta content="ie=edge" http-equiv="X-UA-Compatible"/>
        <title>
            赚钱
        </title>
        <link href="../../css/common/base.css" rel="stylesheet">
            <link href="../../css/common/common.css" rel="stylesheet">
                <link href="../../css/common/bootstrap.min.css" rel="stylesheet">
                    <link href="../../css/make.css" rel="stylesheet">
                        <script src="../../js/jquery-2.1.1.min.js" type="text/javascript">
                        </script>
                        <script src="../../js/bootstrap.min.js" type="text/javascript">
                        </script>
                        <script src="../../js/ajaxrequest.js">
                        </script>
                    </link>
                </link>
            </link>
        </link>
    </head>
    <body>
        <div class="new_money">
            <h4>
                新建\编辑任务
            </h4>
            <ul class="money_ul">
                <p class="P_select">
                    任务类型
                    <select id="select_id">
                        <option>
                            分享
                        </option>
                        <option>
                            视频
                        </option>
                        <option>
                            活动
                        </option>
                        <option>
                            下载
                        </option>
                        <option>
                            试用
                        </option>
                        <option>
                            图文
                        </option>
                    </select>
                    <p>
                        <ul class="money_ulTow" id="div_center">
                        </ul>
                    </p>
                </p>
            </ul>
            <p class="lassLI">
                <button class="btn btn-primary tw_QDOK" type="button">
                    保存创建
                </button>
                <button class="btn btn-primary tw_QX" type="button">
                    取消
                </button>
            </p>
        </div>
        <div class="bottom">
        </div>
    </body>
</html>
<script>
    /*动态加载*/
	
	function AJaxHtml(Url){
		var ajaxobj=new AJAXRequest;   
			ajaxobj.method="GET";  
			ajaxobj.url=Url 
			ajaxobj.callback=function(xmlobj) {
				document.getElementById("div_center").innerHTML=""
			     document.getElementById("div_center").innerHTML = xmlobj.responseText; 
			     Active()
			}
		ajaxobj.send();
	}	
	
var Text = $("#select_id").find("option:selected").text();

$("#select_id").change(function(){
	Text = $(this).find("option:selected").text()
	AJAXIF()
});

function AJAXIF(){
	if(Text=="分享"){			
			AJaxHtml("分享.html")
	} 
	else if(Text=="活动"){
			AJaxHtml("活动.html")
		}
	else if(Text=="试用"){
			AJaxHtml("试用.html")
		}
	else if(Text=="视频"){
			AJaxHtml("视频.html")
		}
	else if(Text=="图文"){
			AJaxHtml("图文.html")
		}
	else if(Text=="下载"){
			AJaxHtml("下载.html")
		}
	else{
		alert("错误，请刷新页面！")
		$("#div_center").html("")
	}
}

AJAXIF()

/*页面操作*/
function Active(){
	$(".add_one").click(function(){
			$("#upload_img").unbind("change",function(){
				return false;
			})
			$('.but_fileOne').click()
	})
	
	
	$(".add_Tow").click(function(){
			$("#upload_imgTOW").unbind("change",function(){
				return false;
			})
			$('.but_fileTow').click()
	})


	$(".add_MP3").click(function(){
			$("#upload_MP3").unbind("change",function(){
				return false;
			})
			$('.but_add_MP3').click()
	})

	
	function FOR(ThisClass){
		for(var i=0; i<ThisClass.length;i++){
			ThisClass.eq(i).click(function(){
				ThisClass.removeClass("one_span")
				$(this).addClass("one_span")
			})
		}
		
	}
	
	FOR($("._SPan>span"))
	FOR($("._SPanS>span"))
	FOR($(".money_ulDiv_one_P>span"))
	FOR($(".money_ulDiv_SP_P>span"))
	
	
	$(".wl").click(function(){
		$(".add_MP3").hide()
		$(".but_add_MP3_common").hide()
		$(".jieru_Li_input").show()
	})

	$(".wj").click(function(){
	 		$(".add_MP3").show()
	 		$(".but_add_MP3_common").show()
	 		$(".jieru_Li_input").hide()
	 })
		 
}
</script>